﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace AwesomeGame
{
    public class Teleporter
    {
        public Vector2 Position { get; set; }
        public bool isDestroyed { get; set; }
        public Vector2 TilePosition { get; set; }
        public bool Active = true;

        private Texture2D _sprite;

        public Teleporter(Vector2 tilePosition, Vector2 position)
        {
            TilePosition = tilePosition;
            Position = position;
            _sprite = Game1.ContentManager.Load<Texture2D>(@"Terrain\Teleporter");
        }

        public void Draw(GameTime gameTime)
        {
            Vector2 screenPosition = Camera.GetScreenPosition(Position);
            Game1.SpriteBatch.Draw(_sprite, screenPosition, null, Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0.8f);
        }

        public void Update(GameTime gameTime)
        {
        }

        public Rectangle GetCollisionRectangle()
        {
            return new Rectangle((int)Position.X, (int)Position.Y, _sprite.Width, _sprite.Height);
        }
    }
}
